import { createApp } from 'vue'
import App from './App.vue'

let app = createApp(App)

// 初始化样式引入
import "normalize.css";

// 引入公共样式
import "@/style/index.scss"

// 注册svg图标
import 'virtual:svg-icons-register'

// 全局svg组件注册
import SvgIcon from "@/components/SvgIcon/index.vue";
app.component("SvgIcon", SvgIcon)

// 完整引入Element plus
// import ElementPlus from 'element-plus'
// import zhCn from 'element-plus/es/locale/lang/zh-cn'
// import 'element-plus/dist/index.css'
// app.use(ElementPlus, {
//     locale: zhCn,
// })
import 'element-plus/dist/index.css'

// 注册element图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

// 引入路由文件
import router from "@/router/index"
app.use(router)


// 引入pinia
import { createPinia } from "pinia";
app.use(createPinia())

// 挂载
app.mount('#app')
